// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'ProductPlanDetailId',
        footer: "Foots",
        cnName: '生产计划明细',
        name: 'ProductPlanDetail',
        newTabEdit: false,
        url: "/ProductPlanDetail/",
        sortName: "ProductPlanDetailId"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"IsCreateTask":"","MaterialNo":"","MaterialName":"","Spec":"","MaterialTypeId":"","UnitId":"","BomNo":"","TechnologicalProcessNo":"","LotText":"","DeliveryDate":"","PlanQty":"","AllPrice":"","AllAmount":"","Remark":""};
    const editFormOptions = [[{"dataKey":"生成生产任务状态","data":[],"title":"生产任务","field":"IsCreateTask","type":"select"},
                               {"title":"产品名称","field":"MaterialName","disabled":true,"type":"text"},
                               {"title":"规格","field":"Spec","disabled":true,"type":"text"},
                               {"dataKey":"物料属性","data":[],"title":"产品类型","required":true,"field":"MaterialTypeId","disabled":true,"type":"select"},
                               {"dataKey":"计量单位","data":[],"title":"计量单位","required":true,"field":"UnitId","disabled":true,"type":"select"},
                               {"title":"Bom编码","field":"BomNo","type":"text"},
                               {"title":"工艺编码","field":"TechnologicalProcessNo","type":"text"},
                               {"dataKey":"批号主档","data":[],"title":"批号","field":"LotText","type":"select"},
                               {"title":"计划数量","required":true,"field":"PlanQty","type":"decimal"},
                               {"title":"单价","field":"AllPrice","type":"decimal"},
                               {"title":"金额","field":"AllAmount","type":"decimal"},
                               {"title":"备注","field":"Remark","type":"text"},
                               {"title":"产品编码","required":true,"field":"MaterialNo","disabled":true,"type":"text"},
                               {"title":"预计交货日期","required":true,"field":"DeliveryDate","type":"date"}]];
    const searchFormFields = {};
    const searchFormOptions = [];
    const columns = [{field:'ProductPlanDetailId',title:'生产订单明细标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'ProductPlanId',title:'生产订单标识',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'MaterialId',title:'产品标识',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'IsCreateTask',title:'生产任务',type:'int',bind:{ key:'生成生产任务状态',data:[]},width:80,hidden:true,align:'left'},
                       {field:'MaterialNo',title:'产品编码',type:'string',width:110,readonly:true,require:true,align:'left'},
                       {field:'MaterialName',title:'产品名称',type:'string',width:110,readonly:true,align:'left'},
                       {field:'Spec',title:'规格',type:'string',width:110,readonly:true,align:'left'},
                       {field:'MaterialTypeId',title:'产品类型',type:'int',bind:{ key:'物料属性',data:[]},width:110,readonly:true,require:true,align:'left'},
                       {field:'UnitId',title:'计量单位',type:'int',bind:{ key:'计量单位',data:[]},width:110,readonly:true,require:true,align:'left'},
                       {field:'BomId',title:'Bom标识',type:'int',width:110,hidden:true,readonly:true,align:'left'},
                       {field:'BomNo',title:'Bom编码',type:'string',width:120,align:'left'},
                       {field:'TechnologicalProcessId',title:'生产工艺标识',type:'int',width:110,hidden:true,readonly:true,align:'left'},
                       {field:'TechnologicalProcessNo',title:'工艺编码',type:'string',width:120,align:'left'},
                       {field:'IsLoted',title:'启用批次',type:'int',bind:{ key:'是否',data:[]},width:80,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'LotText',title:'批号',type:'string',bind:{ key:'批号主档',data:[]},width:220,align:'left'},
                       {field:'LotMasterDetailId',title:'批号标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'DeliveryDate',title:'预计交货日期',type:'datetime',width:150,require:true,align:'left'},
                       {field:'PlanQty',title:'计划数量',type:'decimal',width:110,require:true,align:'left'},
                       {field:'AllPrice',title:'单价',type:'decimal',width:110,align:'left'},
                       {field:'AllAmount',title:'金额',type:'decimal',width:110,align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:180,align:'left'}];
    const detail ={columns:[]};
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}